package com.ruoyi.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * 设备的警报内容
 * @author lsy 2021.12.29
 */
public class AlarmContent {
    public static final Map<Integer, String> modbusAlarmMap = new HashMap<>(); //modbus设备警报内容映射
    public static final Map<String, String> opcAlarmMap = new HashMap<>(); //modbus设备警报内容映射
    static {
        /**
         * modbus警报内容映射地址
         */
        modbusAlarmMap.put(0x0001, "急停键已按下");
        modbusAlarmMap.put(0x0002, "全程计时超时");
        modbusAlarmMap.put(0x0003, "射出监控失败");
        modbusAlarmMap.put(0x0004, "射出护罩未关");
        modbusAlarmMap.put(0x0005, "料筒温度偏差");
        modbusAlarmMap.put(0x0006, "关模未到定位");
        modbusAlarmMap.put(0x0007, "关模保护失败");
        modbusAlarmMap.put(0x0008, "开模未到定位");
        modbusAlarmMap.put(0x0009, "开模数已到");
        modbusAlarmMap.put(0x000A, "开模包装数已到");
        modbusAlarmMap.put(0x000B, "中子 A 未到定位");
        modbusAlarmMap.put(0x000C, "中子 A 动作位置偏差");
        modbusAlarmMap.put(0x000D, "中子 B 未到定位");
        modbusAlarmMap.put(0x000E, "中子 B 动作位置偏差");
        modbusAlarmMap.put(0x000F, "中子 C 未到定位");
        modbusAlarmMap.put(0x0010, "中子 C 动作位置偏差");
        modbusAlarmMap.put(0x0011, "中子 D 未到定位");
        modbusAlarmMap.put(0x0012, "中子 D 动作位置偏差");
        modbusAlarmMap.put(0x0013, "中子 E 未到定位");
        modbusAlarmMap.put(0x0014, "中子 E 动作位置偏差");
        modbusAlarmMap.put(0x0015, "中子 F 未到定位");
        modbusAlarmMap.put(0x0016, "中子 F 动作位置偏差");
        modbusAlarmMap.put(0x0017, "背面安全门未关");
        modbusAlarmMap.put(0x0018, "安全门故障");
        modbusAlarmMap.put(0x0019, "润滑 1 油位低");
        modbusAlarmMap.put(0x001A, "润滑 1 压力未到");
        modbusAlarmMap.put(0x001B, "润滑 1 压力开关故障");
        modbusAlarmMap.put(0x001C, "润滑 2 油位低");
        modbusAlarmMap.put(0x001D, "润滑 2 压力未到");
        modbusAlarmMap.put(0x001E, "润滑 2 压力开关故障");
        modbusAlarmMap.put(0x001F, "润滑 3 油位低");
        modbusAlarmMap.put(0x0020, "润滑 3 压力未到");
        modbusAlarmMap.put(0x0021, "润滑 3 压力开关故障");
        modbusAlarmMap.put(0x0022, "托模未到定位");
        modbusAlarmMap.put(0x0023, "托退未到定位");
        modbusAlarmMap.put(0x0024, "托模方式错误");
        modbusAlarmMap.put(0x0025, "机械手异常");
        modbusAlarmMap.put(0x0026, "机械手紧急停止");
        modbusAlarmMap.put(0x0027, "马达启动失败");
        modbusAlarmMap.put(0x0028, "马达过载");
        modbusAlarmMap.put(0x0029, "电机温度过高");
        modbusAlarmMap.put(0x002A, "电机异常");
        modbusAlarmMap.put(0x002B, "油温偏差");
        modbusAlarmMap.put(0x002C, "H24V 电压异常");
        modbusAlarmMap.put(0x002E, "输出点短路");

        /**
         * opc警报内容映射地址
         */
        opcAlarmMap.put("ERR_DSP_ERROR_1", "温度偏差");
        opcAlarmMap.put("ERR_DSP_ERROR_2", "安全门未关");
        opcAlarmMap.put("ERR_DSP_ERROR_3", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_4", "放开手动/急停键");
        opcAlarmMap.put("ERR_DSP_ERROR_5", "放开手动/急停键");
        opcAlarmMap.put("ERR_DSP_ERROR_6", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_7", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_8", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_9", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_10", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_11", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_12", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_13", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_14", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_15", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_16", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_17", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_18", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_19", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_20", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_21", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_22", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_23", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_24", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_25", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_26", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_27", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_28", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_29", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_30", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_31", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_32", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_33", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_34", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_35", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_36", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_37", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_38", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_39", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_40", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_41", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_42", "请开安全门");
        opcAlarmMap.put("ERR_DSP_ERROR_43", "请开安全门");

    }
}
